3.1527 \(\int \frac{(b+2 c x) (d+e x)}{a+b x+c x^2} \, dx\)

Optimal. Leaf size=70 \[ -\frac{e \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c}+\frac{(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}+2 e x \]

[Out]

2*e*x - (Sqrt[b^2 - 4*a*c]*e*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/c + ((2*c*d - b*e)*Log[a + b*x + c*x^2])/
(2*c)

________________________________________________________________________________________

Rubi [A]  time = 0.0899044, antiderivative size = 70, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.208, Rules used = {773, 634, 618, 206, 628} \[ -\frac{e \sqrt{b^2-4 a c} \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c}+\frac{(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}+2 e x \]

Antiderivative was successfully verified.

[In]

Int[((b + 2*c*x)*(d + e*x))/(a + b*x + c*x^2),x]

[Out]

2*e*x - (Sqrt[b^2 - 4*a*c]*e*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]])/c + ((2*c*d - b*e)*Log[a + b*x + c*x^2])/
(2*c)

Rule 773

Int[(((d_.) + (e_.)*(x_))*((f_) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(e*g*x)/
c, x] + Dist[1/c, Int[(c*d*f - a*e*g + (c*e*f + c*d*g - b*e*g)*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c,
 d, e, f, g}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rubi steps

\begin{align*} \int \frac{(b+2 c x) (d+e x)}{a+b x+c x^2} \, dx &=2 e x+\frac{\int \frac{b c d-2 a c e+\left (2 c^2 d-b c e\right ) x}{a+b x+c x^2} \, dx}{c}\\ &=2 e x+\frac{\left (\left (b^2-4 a c\right ) e\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 c}+\frac{(2 c d-b e) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 c}\\ &=2 e x+\frac{(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}-\frac{\left (\left (b^2-4 a c\right ) e\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{c}\\ &=2 e x-\frac{\sqrt{b^2-4 a c} e \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{c}+\frac{(2 c d-b e) \log \left (a+b x+c x^2\right )}{2 c}\\ \end{align*}

Mathematica [A]  time = 0.0663603, size = 72, normalized size = 1.03 \[ \frac{-2 e \sqrt{4 a c-b^2} \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )+(2 c d-b e) \log (a+x (b+c x))+4 c e x}{2 c} \]

Antiderivative was successfully verified.

[In]

Integrate[((b + 2*c*x)*(d + e*x))/(a + b*x + c*x^2),x]

[Out]

(4*c*e*x - 2*Sqrt[-b^2 + 4*a*c]*e*ArcTan[(b + 2*c*x)/Sqrt[-b^2 + 4*a*c]] + (2*c*d - b*e)*Log[a + x*(b + c*x)])
/(2*c)

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 113, normalized size = 1.6 \begin{align*} 2\,ex-{\frac{\ln \left ( c{x}^{2}+bx+a \right ) be}{2\,c}}+\ln \left ( c{x}^{2}+bx+a \right ) d-4\,{\frac{ae}{\sqrt{4\,ac-{b}^{2}}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{2}e}{c}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*c*x+b)*(e*x+d)/(c*x^2+b*x+a),x)

[Out]

2*e*x-1/2/c*ln(c*x^2+b*x+a)*b*e+ln(c*x^2+b*x+a)*d-4/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*a*e+
1/(4*a*c-b^2)^(1/2)*arctan((2*c*x+b)/(4*a*c-b^2)^(1/2))*b^2/c*e

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)/(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.49453, size = 410, normalized size = 5.86 \begin{align*} \left [\frac{4 \, c e x + \sqrt{b^{2} - 4 \, a c} e \log \left (\frac{2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt{b^{2} - 4 \, a c}{\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) +{\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c}, \frac{4 \, c e x - 2 \, \sqrt{-b^{2} + 4 \, a c} e \arctan \left (-\frac{\sqrt{-b^{2} + 4 \, a c}{\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) +{\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)/(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

[1/2*(4*c*e*x + sqrt(b^2 - 4*a*c)*e*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c - sqrt(b^2 - 4*a*c)*(2*c*x + b))/(c
*x^2 + b*x + a)) + (2*c*d - b*e)*log(c*x^2 + b*x + a))/c, 1/2*(4*c*e*x - 2*sqrt(-b^2 + 4*a*c)*e*arctan(-sqrt(-
b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) + (2*c*d - b*e)*log(c*x^2 + b*x + a))/c]

________________________________________________________________________________________

Sympy [B]  time = 0.870778, size = 134, normalized size = 1.91 \begin{align*} 2 e x + \left (- \frac{e \sqrt{- 4 a c + b^{2}}}{2 c} - \frac{b e - 2 c d}{2 c}\right ) \log{\left (x + \frac{d + \frac{e \sqrt{- 4 a c + b^{2}}}{2 c} + \frac{b e - 2 c d}{2 c}}{e} \right )} + \left (\frac{e \sqrt{- 4 a c + b^{2}}}{2 c} - \frac{b e - 2 c d}{2 c}\right ) \log{\left (x + \frac{d - \frac{e \sqrt{- 4 a c + b^{2}}}{2 c} + \frac{b e - 2 c d}{2 c}}{e} \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)/(c*x**2+b*x+a),x)

[Out]

2*e*x + (-e*sqrt(-4*a*c + b**2)/(2*c) - (b*e - 2*c*d)/(2*c))*log(x + (d + e*sqrt(-4*a*c + b**2)/(2*c) + (b*e -
 2*c*d)/(2*c))/e) + (e*sqrt(-4*a*c + b**2)/(2*c) - (b*e - 2*c*d)/(2*c))*log(x + (d - e*sqrt(-4*a*c + b**2)/(2*
c) + (b*e - 2*c*d)/(2*c))/e)

________________________________________________________________________________________

Giac [A]  time = 1.15595, size = 109, normalized size = 1.56 \begin{align*} 2 \, x e + \frac{{\left (2 \, c d - b e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, c} + \frac{{\left (b^{2} e - 4 \, a c e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{\sqrt{-b^{2} + 4 \, a c} c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*c*x+b)*(e*x+d)/(c*x^2+b*x+a),x, algorithm="giac")

[Out]

2*x*e + 1/2*(2*c*d - b*e)*log(c*x^2 + b*x + a)/c + (b^2*e - 4*a*c*e)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(s
qrt(-b^2 + 4*a*c)*c)